<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::get('/test','ApiController@Receive');
Route::get('/pullTest','ApiController@test');

//烟感数据入口
Route::any('/deviceInfo','SmokeApiController@deviceInfo');
Route::any('/deviceData','SmokeApiController@deviceData');
// Route::any('/test','SmokeApiController@test');
Route::any('/test1','SmokeApiController@test1');
// Route::any('/haikang','SmokeApiController@haikang');
//
//登陆
Route::post('MLogin','MiniController@MiniLogin');
//退出登陆
Route::post('MLogout','MiniController@MiniLogout');

//项目列表
Route::any('MProjectlist','ProjectController@Projectlist');
//获取项目
Route::get('getProject','ProjectController@getProject');
//获取底图
Route::get('getPlane','ProjectController@getPlane');
//我的项目
Route::get('myProject','ProjectController@myProject');
//添加/修改 项目
Route::post('MaddProject','ProjectController@addProject');

// Route::
//任务列表
Route::get('MTasklist','TaskController@Tasklist');
//新增任务
Route::post('MaddTask','TaskController@addTask');
//搜索消息
Route::any('message','MessageController@message');
// //搜索消息
// Route::post('searchMessage','MessageController@searchMessage');
//处理报警信息
Route::post('solution','MessageController@solution');
//任务列表
Route::post('mission_list','MessageController@mission_list');
//发布任务
Route::post('addmission','MessageController@addmission');
//任务详情
Route::get('mission_detail','MessageController@mission_detail');
//任务完成提交
Route::post('CompletionTask','MessageController@CompletionTask');
//用户列表
Route::any('userlist','UserController@userlist');
//新增/修改用户
Route::post('addMember','UserController@addMember');
//修改用户
Route::post('editMember','UserController@editMember');
//获取项目成员
Route::get('Members','UserController@Members');
//获取成员
Route::get('getMembers','UserController@getMembers');
//获取角色
Route::get('getRole','UserController@getRole');
//修改密码
Route::post('changePass','UserController@changePass');
//获取所有设备
Route::any('getDeviceList','ApiController@getDeviceList');

Route::any('weikongsend','ApiController@weikongsend');
//设备列表
Route::get('M_Devicelist','ProjectController@DeviceList');
//实时曲线页面获取项目Boxid
Route::get('getRealProjectBox','ProjectController@getRealProjectBox');
//实时曲线页面获取Group
Route::get('getRealProjectGroup','ProjectController@getRealProjectGroup');
//添加/修改 设备
Route::post('M_addDevice','ProjectController@addDevice');
//锐传设备详情
Route::get('M_DeviceDetail','WeikongController@DeviceDetail');
//特性曲线页
Route::get('Identity','WeikongController@Identity');
//特性曲线获取点
Route::get('geiDevicePoiont','WeikongController@geiDevicePoiont');
//获取点
Route::get('getPointsByCabinetId','WeikongController@getPointsByCabinetId');
//根据点获取charts数据
Route::get('getChartDataByPoint','WeikongController@getChartDataByPoint');
//实时数据
Route::get('getRealtimeDataByMiniGroup','WeikongController@getRealtimeDataByMiniGroup');
//设备状态
Route::get('getDeviceStatusCharts','WeikongController@getDeviceStatusCharts');
//设备筛选
Route::post('M_selectDevice','ProjectController@selectDevice');
//维控列表
Route::get('weikonglist','WeikongController@weikonglist');
//获取维控
Route::post('getweikong','WeikongController@getweikong');
//维控详情
Route::post('weikongdetail','WeikongController@weikongdetail');
//维控历史数据
Route::post('getWeikongLog','WeikongController@getWeikongLog');

//烟感设备详情
Route::get('Smokedevice','SmokeController@Smokedevice');

//热成像数据上传 averageTemperature
Route::any('ThermalData','ThermalController@ThermalData');
//热成像报警上传
Route::any('ThermalWarning','ThermalController@ThermalWarning');

Route::get('getWeikongSid','ApiController@getWeikongSid');
Route::any('getFakeDatas','ApiController@getFakeDatas');
//宏发
Route::get('getHongfa','HongfaController@getHongfa');

Route::get('getHongfaData','HongfaController@getHongfaData');
//获取设备数据
Route::post('getSwitchDataByDevice','ApiController@getSwitchDataByDevice');
//获取分组设备
Route::post('getSwitchGroup','ApiController@getSwitchGroup');
//获取开关状态
Route::post('setSwitchStatus','ApiController@setSwitchStatus');
//根据优先级 全关/全关
Route::post('setSwitchStatusByLevels','ApiController@setSwitchStatusByLevels');
Route::post('setBatteryConfig','ApiController@setBatteryConfig');
//修改开关分级
Route::get('changeLevel','ApiController@changeLevel');
//华为云 消息回调
Route::post('huaweiCallback','ApiController@huaweiCallback');

//锁列表
Route::post('getLockList','ApiController@getLockList');
//查询锁状态
Route::post('getLockStatus','ApiController@getLockStatus');
//开锁
Route::post('PubLock','ApiController@PubLock');
//锁记录
Route::post('setLockRecord','ApiController@setLockRecord');
Route::post('getLockRecordList','ApiController@getLockRecordList');

//维控盒子电源柜
Route::post('getBoxList','WeikongController@getBoxList');
Route::post('getCabinetsByBox','WeikongController@getCabinetsByBox');
Route::post('getDataByCabinet','WeikongController@getDataByCabinet');
Route::post('getRealtimeDataByCabinet','WeikongController@getRealtimeDataByCabinet');
Route::post('getHistoryByPoint','WeikongController@getHistoryByPoint');
Route::post('downloadHistoryByPoint','WeikongController@downloadHistoryByPoint');
Route::post('addBox','WeikongController@addBox');
Route::post('syncBox','WeikongController@syncBox');
Route::post('getCabinetAlarmLogs','WeikongController@getCabinetAlarmLogs');
Route::post('dealCabinetAlarmLog','WeikongController@dealCabinetAlarmLog');
Route::post('getRealtimeBaseByCabinet','WeikongController@getRealtimeBaseByCabinet');
Route::post('getRealtimeNowByCabinet','WeikongController@getRealtimeNowByCabinet');
Route::post('getCabinetPoints','WeikongController@getCabinetPoints');
Route::post('setCabinetPoint','WeikongController@setCabinetPoint');
//海为
Route::post('getHaiweiData','ApiController@getHaiweiData');
//鼎信临时数据
Route::get('dingxinWeekData','DingxinTempController@getWeekData');

//除尘小程序
Route::group(['prefix' => 'dedusting'], function()
{
    Route::post('wxLogin','DedustingController@wxLogin');
    Route::post('sendVerifyCode','DedustingController@sendVerifyCode');
    Route::post('register','DedustingController@register');
    Route::post('login','DedustingController@login');
    Route::post('reset-password','DedustingController@resetPassword');
    Route::post('change-password','DedustingController@changePassword');
    Route::post('bind-device','DedustingController@bindDevice');

    Route::get('libraries','DedustingController@libraries');
    Route::get('library-detail','DedustingController@libraryDetail');
    Route::post('library-view','DedustingController@libraryView');

    Route::get('devices','DedustingController@devices');
    Route::get('device-info','DedustingController@deviceInfo');
    Route::get('device-data','DedustingController@deviceData');
    Route::get('device-adjustment','DedustingController@deviceAdjustment');

    Route::get('repairs','DedustingController@repairs');
    Route::get('alarms','DedustingController@alarms');
    Route::get('alarm-count','DedustingController@alarmCount');
    Route::get('alarm-detail','DedustingController@alarmDetail');
    Route::post('deal-alarm','DedustingController@dealAlarm');

    Route::post('feedback','DedustingController@feedback');
    Route::post('feedback-upload','DedustingController@feedbackUpload');
});